﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace HSMPWeb.MySocietyPortalPages
{
    public partial class ForgotPassword : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnEmailIdOk_Click(object sender, EventArgs e)
        {
            this.DivVerificationCode.Visible = true;
            this.DivEmailId.Visible = false;
        }

        protected void btnVerificationOk_Click(object sender, EventArgs e)
        {
            this.DivEmailId.Visible = false;
            this.DivVerificationCode.Visible = false;
            this.DivNewPassword.Visible = true;
        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.txtNewPassword.Text == "" && this.txtRePassword.Text == "")
                {
                    this.lblErrorMessage.Text = "Can't be blank";
                    this.DivNewPassword.Visible = true;
                }
                else
                {
                    if (this.txtNewPassword.Text == this.txtRePassword.Text)
                    {
                        this.DivNewPassword.Visible = false;
                        this.DivPasswordChengedMessage.Visible = true;
                    }
                    else
                    {
                        this.lblErrorMessage.ForeColor = System.Drawing.Color.Red;
                        this.lblErrorMessage.Text = "New password and Re-Entered password not matching";
                        this.DivNewPassword.Visible = true;
                    }
                }
            }
            catch (Exception ex)
            {
                //ExceptionUtility.ExceptionHandler(ex, Server.MapPath("~/"));
            }
        }

        protected void btnClose_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Index.aspx");
        }
    }
}